﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DapperExtensions.Mapper;
using Newtonsoft.Json;
using ZLWeb.WebApiEntityBase;
using ZilLion.Service.Core.Domain.EntityBase.JsonConverter;

namespace ZL.CRM.CommonEntity.AccYwDetail
{
    public class Cfv4Accaddcard:QMessage
    {

        /// <summary>
        ///  申请时间
        /// </summary>
        [JsonConverter(typeof(ChinaDateTimeConverter))]
        public DateTime Oprtime { get; set; }

        /// <summary>
        ///  操作记录流水号
        /// </summary>
        public string Oprsno { get; set; }

        /// <summary>
        ///  账户id
        /// </summary>
        public long Opraccid { get; set; }

        /// <summary>
        ///  操作类型：1-绑定实体卡 2-添加新微信凭证appid+|+openid（针对不同appid同手机号的情况）
        /// </summary>
        public short Oprtype { get; set; }

        /// <summary>
        ///  添加凭证号：实体卡卡号
        /// </summary>
        public string Oprcardno { get; set; }

        /// <summary>
        ///  折扣类别id(操作类型=1)
        /// </summary>
        public int Oprzklbid { get; set; }

        /// <summary>
        ///  卡种id(操作类型=1)
        /// </summary>
        public int Oprkzid { get; set; }

        /// <summary>
        ///  申请绑定端痕迹信息
        /// </summary>
        public string Oprcdesc { get; set; }

    }
    public class Cfv4AccaddcardMapper : ClassMapper<Cfv4Accaddcard>
    {
        public Cfv4AccaddcardMapper()
        {
            Table("#Cfv4Accaddcard");
            Map(f => f.Oprtime).Column("Oprtime");
            Map(f => f.Oprsno).Column("Oprsno");
            Map(f => f.Opraccid).Column("Opraccid");
            Map(f => f.Oprtype).Column("Oprtype");
            Map(f => f.Oprcardno).Column("Oprcardno");
            Map(f => f.Oprzklbid).Column("Oprzklbid");
            Map(f => f.Oprkzid).Column("Oprkzid");
            Map(f => f.Oprcdesc).Column("Oprcdesc");

        }
    }
}
